using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Primitives;

namespace Extensions.Configuration.Database
{
    /// <summary>
    /// 数据库提供者接口
    /// </summary>
    public interface IDatabaseProvider
    {
        /// <summary>
        /// 加载数据
        /// </summary>
        /// <param name="dbContextOptions"></param>
        /// <returns></returns>
        IDictionary<string, string> Load(DbContextOptions<ConfigurationDatabaseContext> dbContextOptions);

        /// <summary>
        /// 监视数据变化
        /// </summary>
        /// <param name="dbContextOptions"></param>
        /// <returns></returns>
        IChangeToken Watch(DbContextOptions<ConfigurationDatabaseContext> dbContextOptions);
    }
}